package cn.schoolwow.quickdao.test.module.business.user.log.testcase;

import cn.schoolwow.quickdao.test.module.business.user.dml.user.testcase.AddUserTestCaseFlow;
import cn.schoolwow.quickdao.test.module.business.user.log.flow.CheckDatabaseUpgradeResultFlow;
import cn.schoolwow.quickdao.test.module.business.user.log.flow.DatabaseUpgradeProcessFlow;
import cn.schoolwow.quickdao.test.module.business.user.log.flow.InitialDatabaseUpgradeFlow;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;

public class DatabaseUpgradeTestCaseFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        flowContext.startFlow(new InitialDatabaseUpgradeFlow())
                .next(new AddUserTestCaseFlow())
                .next(new DatabaseUpgradeProcessFlow())
                .next(new CheckDatabaseUpgradeResultFlow())
                .execute();
    }

    @Override
    public String name() {
        return "数据库升级测试用例";
    }
}
